import {LitElement, html} from "lit";
import { unsafeSVG } from 'lit/directives/unsafe-svg.js';

class KldIconSelectorItemComponent extends LitElement {
    static properties = {
        value: {
            type: String,
            reflect: true,
        },
        svg: {
            type: String,
            state: true,
        }
    };

    connectedCallback() {
        super.connectedCallback();
        this.setAttribute('role', 'option');
    }

    createRenderRoot() {
        return this;
    }

    render() {
        return html` ${unsafeSVG(this.svg)} `;
    }
}

customElements.define("kld-icon-selector-component", KldIconSelectorItemComponent);
export default KldIconSelectorItemComponent;
